package response

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

func ErrorResponse(r *gin.Context, msg string) {
	r.JSON(http.StatusBadRequest, gin.H{
		"code":    500,
		"message": msg,
		"data":    nil,
	})
}

func SuccessResponse(r *gin.Context, msg, data interface{}) {
	r.JSON(http.StatusOK, gin.H{
		"code":    200,
		"message": msg,
		"data":    data,
	})
}
